<admintpl file="header" />
</head>
<body style="min-width: 800px;">
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('index')}">申请管理</a></li>
			<li class=""><a href="{:U('',['print'=>2,'map'=>$map])}" target='_blank'>导出预览</a></li>
			<li class=""><a href="{:U('',['print'=>1,'map'=>$map])}">导出</a></li>
			<li class=""><a href="{:U('re_apply')}">补交申请</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('index')}">
			时间
			<input type="text" name="start_time" class="js-date" value="{$_REQUEST[start_time]}" style="width: 80px;" autocomplete="off">-
			<input autocomplete="off" type="text" class="js-date" name="end_time" value="{$_REQUEST['end_time']}" style="width: 80px;">
			<input type="text" name="name" style="width: 200px;" value="{$_REQUEST[name]}"  placeholder='姓名'>

			<select name="dep_id" id="">
				<option value="">请选择部门</option>
				{:dep_select($_POST[dep_id])}
			</select>	
			<select name="type" id="" style='width:150px'>
				<option value="">申请类型</option>
				<foreach name='type' item='vo' key='k'>
					<option value="{$k}" {$k == $_POST[type] ? "selected" : ''} >{$vo}</option>
				</foreach>
			</select>
			<select name="vacation" id="" style='width:150px'>
				<option value="">假期类型</option>
				<foreach name='vacation' item='vo' key='k'>
					<option value="{$k}" {$k == $_POST[vacation] ? "selected" : ''} >{$vo}</option>
				</foreach>
			</select>
			发布时间
			<input type="text" name="create_start" class="js-date" value="{$_REQUEST[create_start]}" style="width: 80px;" autocomplete="off">-
			<input autocomplete="off" type="text" class="js-date" name="create_end" value="{$_REQUEST[create_end]}" style="width: 80px;">
			
			
			<button class="btn btn-primary">搜索</button>
			<a class="btn btn-primary" href="{:U('')}">清空</a>
		</form>
		<form class="js-ajax-form" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">ID</th>
						<th width="">工号</th>
						<th width="">姓名</th>
						<th width="">部门</th>
						<th width="">请假日期</th>
						<th width="">请假原因</th>
						<th width="">小时数</th>
						<th width="">类型</th>
						<th width="">发布时间</th>
						<th width="">状态</th>
						<th width="">操作</th>
					</tr>
				</thead>
				<volist name="list" id="vo">
					<tr>
						<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}"></td>
						<td>{$vo.id}</td>
						<td>{$vo.sn}</td>
						<td>{$vo.name}</td>
						<td>{$vo.dep_name}</td>
						<td>{$vo.start_time}  <neq name='vo[type]' value='4'>至</neq>    {$vo.end_time}</td>
						<if condition='$vo[type] eq 4' >
							<td>
								<notempty name='vo.start_time'>补上班卡</notempty>
								<notempty name='vo.end_time'>补下班卡</notempty>
							</td>
							<else />
							<td>{$vo.content}</td>
						</if>
						<td>{:round($vo[total_min]/60,2)}</td>
						<td>{$vo[vacate_type] ? get_vacation_name_ch($vo[vacate_type]) :get_vacation_name_ch($vo[type])}</td>
						<td>{$vo.created_time}</td>
						<td>{$status[$vo[status]]}</td>
						<td>
							<a href="{:U('destroy',['id'=>$vo[id]])}" class={$vo[status] == 1 ? 'js-dialog':'js-ajax-dialog-btn' } data-msg='您确定要撤销该申请么？'>撤销</a>
							<eq name='vo.status' value='0'>
								|<a href="{:U('auditPass',['id'=>$vo[id]])}" class='ajax-get confirm'>通过</a>
							</eq>
						</td>
					</tr>
				</volist>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>